/**
 * constantRoutes
 * 静态路由
 */
export const constantRoutes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  },

  {
    path: '/',
    redirect: '/login'
  },

  {
    path: '/dashboard',
    name: 'Dashboard',
    meta: {
      title: '工作看板',
      icon: 'el-icon-s-home'
    },
    redirect: '/home',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '/home',
        name: 'Home',
        meta: {
          title: '首页',
          icon: 'el-icon-s-home'
        },
        component: () => import('@/views/home/index.vue')
      }
    ]
  },
  {
    path: '/404',
    name: 'Error404',
    component: () => import('@/views/error/Error404.vue')
  },
  {
    path: '/500',
    name: 'Error500',
    component: () => import('@/views/error/Error500.vue')
  },
  {
    path: '/403',
    name: 'Error403',
    component: () => import('@/views/error/Error403.vue')
  },

  {
    path: '*',
    redirect: '/404'
  }
  // {
  //   path: '/:pathMatch(.*)*',
  //   // component: () => import('@/views/error/404.vue')
  //   redirect: '/404'
  // }
];
